/* 
 * Copyright (C) 2004-2005 Jonathan Bindel
 * Copyright (C) 2006-2007 Eskil Bylund
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

using System;

namespace DCSharp.Backend.Objects
{
	public enum ResultType
	{
		Directory,
		File
	}

	/// <summary>
	/// A search result.
	/// </summary>
	public class SearchResult
	{
		private ResultType type;
		private string path;
		private User user;
		private long size;
		private int freeSlots;
		private int slots;
		private string tth;

		public SearchResult(ResultType type, string path) : this(type, path, 0,
			null)
		{
		}

		public SearchResult(ResultType type, string path, long size, string tth)
		{
			this.type = type;
			this.path = path;
			this.size = size;
			this.tth = tth;
		}

		public SearchResult()
		{
		}

		#region Properties

		public ResultType Type
		{
			get { return type; }
			internal set { type = value; }
		}

		public string Path
		{
			get { return path; }
			internal set { path = value; }
		}

		public User User
		{
			get { return user; }
			internal set { user = value; }
		}

		public long Size
		{
			get { return size; }
			internal set { size = value; }
		}

		public int FreeSlots
		{
			get { return freeSlots; }
			internal set { freeSlots = value; }
		}

		public int Slots
		{
			get { return slots; }
			internal set { slots = value; }
		}

		public string TTH
		{
			get { return tth; }
			internal set { tth = value; }
		}

		#endregion
	}
}
